What is it was fun while it lasted meaning?

The phrase "it was fun while it lasted" is commonly used to express the sentiment that an enjoyable experience has come to an end. It implies that although the experience was enjoyable, it could not continue indefinitely and must come to a close. This phrase is often used to express feelings of nostalgia or sadness at the end of a period of enjoyment. It can refer to a wide variety of situations, such as a vacation, a relationship, a job or a party, among others. Overall, this phrase conveys the message that although something enjoyable has ended, it will always be remembered fondly.